# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kcron
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # Missing dependencies
url="https://kde.org/applications/system/"
pkgdesc="Configure and schedule tasks"
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev kconfigwidgets-dev kdoctools-dev ki18n-dev kiconthemes-dev kio-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kcron-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="28dbc8bcd54bc8d385d3cc3be437d5b965699ce829e5d527cd405543016d0432fb4457d1ac9718d815a5fcf1b20c2b3c765a31137a4992be2a16ce17f00e8e62  kcron-20.04.3.tar.xz"
